package com.luanmad.ajax.dtree.manager.impl;

import java.sql.SQLException;
import java.util.List;

import com.luanmad.ajax.dtree.dao.TreeNodesDAO;
import com.luanmad.ajax.dtree.manager.TreeNodesManager;
import com.luanmad.ajax.dtree.model.TreeNodes;

/**
 * 类说明
 *
 * @author  luanmad!
 * @version V1.0  创建时间：2009-8-18 上午09:08:45
 * forum :www.zoomhoo.com
 */
public class TreeNodesManagerImpl implements TreeNodesManager
{

	private TreeNodesDAO treeNodesDAO;
	
	public TreeNodesDAO getTreeNodesDAO()
	{
		return treeNodesDAO;
	}

	public void setTreeNodesDAO(TreeNodesDAO treeNodesDAO)
	{
		this.treeNodesDAO = treeNodesDAO;
	}

	public void addNode(TreeNodes treeNodes) throws SQLException
	{
		treeNodesDAO.addNode(treeNodes);
	}

	public void deleteNode(int id) throws SQLException
	{
       treeNodesDAO.deleteNode(id);
	}

	public List queryNodes(String sql) throws SQLException
	{
		return treeNodesDAO.queryNodes(sql);
	}

	public void updateNode(TreeNodes treeNodes) throws SQLException
	{
          treeNodesDAO.updateNode(treeNodes);
	}

	public String sortNode(TreeNodes treeNodes, String move)
			throws SQLException
	{
        return treeNodesDAO.sortNode(treeNodes, move);		
	}

	public void updateByselectiveKey(int id, int sort) throws SQLException
	{
		treeNodesDAO.updateByselectiveKey(id, sort);
		
	}

}
 